The present invention generally relates to a communication node forming a computer network. More particularly, the present invention relates to a bus optimizing method used on a network connecting ports of a communication node to ports of other communication nodes on a one-to-one basis and having an acyclic directed graph, for logically disconnecting a loop accidentally formed on the network in order to disable the loop.
Conventionally, a tree-type network, a daisy-chain type network and the like are known as a network of the type connecting ports of a communication node to ports of other communication nodes on a one-to-one basis. One of networks using such a connection state of communication nodes is IEEE Standard (1394 Standard for a High Performance Serial Bus) (hereinafter, simply referred to as “1394”).
In 1394, the network is initialized so that communication nodes form parent-child relationships according to the positional relation on the network. Therefore, a path to a root node in charge of arbitration is uniquely determined. In other words, the 1394 network has a directed graph. Moreover, in 1394, it is possible to dynamically assign a node number, a unique address, to each communication node based on the parent-child relationships. This method is specifically described in, e.g., International Application No. PCT/US93/12314 titled “Method and Apparatus for Unique Address Assignment, Node Self-Identification and Topology Mapping for a Directed Acyclic Graph”.
According to this method, the network must be initialized so that a path to each communication node is uniquely determined. In other words, the entire network or a part of the network must not form a loop. If a loop is formed on the network, it must be disconnected in some way.
In 1394, if there is any loop on the network, initialization of the network will not be completed within a prescribed period. In such a case, a bit indicating the presence of the loop is set in an internal register in order to warn the user of the presence of the loop. Another method is described in International Application No. PCT/US93/12317 titled “Method and Apparatus for Transforming an Arbitrary Topology Collection of Nodes into an Acyclic Directed Graph”.
In “P1394b Draft Standard for a High Performance Serial Bus”, it is determined whether a loop is formed by connection of a signal cable or not. If a loop is formed, it is disconnected by logically ignoring connection of the signal cable. Hereinafter, this operation will be described with reference to FIG. 7.
Referring to FIG. 7, the routine is started in step 300. If communication nodes detect new connection of a signal cable in step 301 (YES in step 301), they conduct arbitration in step 302. The arbitration result is then determined in step 303. A communication node that won the arbitration becomes a test initiator. However, a communication node that lost the arbitration becomes a test target.
In step 304, the test initiator transmits a loop test packet (hereinafter, referred to as “LTP”) to active ports and transmits a loop test signal (hereinafter, referred to as “LTS”) to the port where the connection was detected. In step 308, the test target transmits an LTS to the port where the connection was detected. In other words, the test initiator and the test target are each receiving the LTS from the other. Both LTP and LTS have information identifying the communication node that transmits LTP and LTS, respectively.
The test initiator waits until a prescribed time has passed in step 305 or until the content of the LTS transmitted from the test target matches the content of the LTP transmitted from the test initiator in step 306.
When the test target receives the LTP in step 309 (YES in step 309), it changes the content of the LTS that is being transmitted therefrom to the same content as that of the received LTP in step 310. In step 311, the test target determines whether a prescribed time has passed or not. The test target continuously transmits the LTS during the prescribed time.
If the content of the LTS transmitted from the test target matches that of the LTP transmitted from the test initiator in step 306 (YES in step 306), the test initiator determines that a loop is formed. The test initiator then disconnects the loop by disabling the finally detected connection of a signal cable, that is, connection of a signal cable that triggers this loop disconnection process.
As has been described above, a loop that is accidentally formed on a bus by the user is conventionally disconnected by the above methods.
In the conventional methods, however, the loop is disconnected at a port where connection of a signal cable was finally detected. In other words, the loop is disconnected by disabling operation of that port. Since the loop is disconnected at a fixed point, the best signal transfer efficiency can not necessarily be implemented on the network.